package com.xx.ch05.demo.demo10;

import com.xx.ch05.demo.demo07.Ink;

import java.awt.*;

/**
 * @author 许欣
 * 时间：2022/4/11 15:39
 * 描述：
 */
public class GreyInk implements Ink {
    @Override
    public String getColor(int red, int green, int blue) {
        int c=(red+green+blue);
        Color color=new Color(c,c,c);
        return "#"+Integer.toHexString(color.getRGB()).substring(2);
    }
}
